package main

import "fmt"

func main() {
	intv1 := 1
	intv2 := 2
	i := max(intv1, intv2)
	fmt.Print(i)
	string1 := "haha1"
	string2 := "haha2"
	s, s2 := swap(string1, string2)
	fmt.Print(s, s2)

}

/* 函数返回两个数的最大值 */
func max(num1, num2 int) int {
	/* 声明局部变量 */
	var result int

	if num1 > num2 {
		result = num1
	} else {
		result = num2
	}
	return result
}
func swap(x, y string) (string, string) {
	return y, x
}
